﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using _6._1_MyMathTool;


namespace _6_1_mathTool
{
    internal class Program
    {
        static void Main(string[] args)
        {
            #region 第一题
            //double[] pointA = new double[] { -2, 9 };
            //double[] pointB = new double[] { -10, 3 };
            //double L = 5;
            //double[] pointL = MathTool.LPointCoordinates(pointA, pointB, L);
            //Console.WriteLine("点L的坐标为：(" + pointL[0] + ", " + pointL[1] + ")");
            //Console.ReadKey();
            #endregion

            #region 第二题
            //double[] Pa = new double[] { 0, 0 };
            //double[] AOset = MathTool.AOffsetCoordinate(Pa, 10);
            //Console.WriteLine("点A的坐标为：(" + AOset[0] + ", " + AOset[1] + ")");
            //Console.ReadKey();
            #endregion

            #region 第三题
            double[] pointA = new double[2] { 1, 1 };
            double[] pointB = new double[2] { 3, 1 };
            double r = 2;
            double rota = 90;
            double[] B = MathTool.BRotationCoordinates(pointA, pointB, r, rota);
            Console.WriteLine("点B的坐标为：(" + B[0] + ", " + B[1] + ")");
            #endregion

            #region 第四题
            //double[] pointA = new double[] { 4, 0, 0 };
            //double[] pointB = new double[] { -5, 0, 0 };
            //double[] pointC = new double[] { 0, 1, 0 };

            //double[] normalVector = MathTool.NormalVector(pointA, pointB, pointC);
            //Console.WriteLine("法线的坐标为({0},{1},{2})", normalVector[0], normalVector[1], normalVector[2]);
            #endregion

            #region 第五题
            //double[] pointA = { 1, 0 };
            //double[] pointB = { -2, 0 };
            //double[] pointC = { 0, 1 };
            //double[] pointD = { 0, -2 };
            //double[] jd = MathTool.Intersection(pointA, pointB, pointC, pointD);
            //Console.WriteLine("交点的坐标为({0},{1})", jd[0], jd[1]);
            #endregion

            #region 第六题
            //double[] pointO = { -2, 0 };
            //double[] pointA = { 2, 0 };
            //double R = 1;
            //double[][] qd = MathTool.pointOfTangency(pointO, pointA, R);
            //Console.WriteLine("切点的坐标1为({0},{1})", qd[0][0], qd[0][1]);
            //Console.WriteLine("切点的坐标2为({0},{1})", qd[1][0], qd[1][1]);
            #endregion

            #region 第七题
            //double[] pointO = { 0, 0 };
            //double[] pointA = { 5, 0 };
            //double[] pointB = { 0, 5 };
            //double R =5;
            //double[][] jd = MathTool.pointABIntersection(pointO, pointA, pointB, R);
            //Console.WriteLine("交点的坐标1为({0},{1})", jd[0][0], jd[0][1]);
            //Console.WriteLine("交点的坐标1为({0},{1})", jd[1][0], jd[1][1]);
            #endregion

            #region 第八题
            //double[] o = { 0, 0 };
            //double[] A = { 1, 1 };
            //double r = Math.Sqrt(2);
            //double angle = MathTool.tangentDirectionAngle(o, r, A);
            //Console.WriteLine("角度为{0}度", angle);
            #endregion
        }

    }
}
